Conversation
|
Rough next steps in no particular order
|
|
910d91b to
b5c01e6
Compare
71bdbcf to
2371239
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1413 +/- ##
==========================================
+ Coverage 95.96% 96.28% +0.32%
==========================================
Files 45 46 +1
Lines 3317 3606 +289
==========================================
+ Hits 3183 3472 +289
Misses 134 134 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
b5c32f7 to
40cbd59
Compare
9d061e9 to
b2936d4
Compare
_ws_address doesn't count as a get method
Handle the path mangling in code instead of via URL constraints and Field annotations. Stops the type checking falling over
Using pydantic's dependency handling means they end up in the openapi schema even when auth is not being used.
| class Pause(BaseModel): | ||
| kind: Literal["pause"] = "pause" | ||
|
|
||
|
|
||
| class Resume(BaseModel): | ||
| kind: Literal["resume"] = "resume" | ||
|
|
||
|
|
||
| class Abort(BaseModel): | ||
| kind: Literal["abort"] = "abort" | ||
| reason: str | None = None |
There was a problem hiding this comment.
These aren't used at the moment. Cancelling from the client side will abort the plan on the server.
|
|
||
|
|
||
| @secure_router_v2.websocket("/run_plan") | ||
| async def run_plan( |
There was a problem hiding this comment.
I think this method should be refactored into its own class but for now I'd like to get something usable in before improving it in further PRs
|
Should probably have a way for plans run via the plan cache to use websockets. They currently default to using the existing message bus approach. Something like bc = BlueapiClient.from_config_file(...)
bc.use_ws(True)
bc.plans.count(detectors=[bc.devices.det])It's not ideal though so open to suggestions. A new client only config field? |
As an intermediate step before (or instead of?) redesigning the server sub-process handling, we can add a websocket endpoint to run the same submit-listen-start approach that the client runs remotely.